settings: Never override some font properties
authorBenjamin Otte <otte@redhat.com>
Fri, 30 Nov 2012 23:18:01 +0000 (00:18 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 30 Nov 2012 23:18:01 +0000 (00:18 +0100)
According to the CSS specification, everything but font-size and
font-family are defined by CSS. So we don't override them anymore.

gtk/gtksettings.c

index 2ba95ad67041cd7ec439de43f50c5ab90ace70e6..819966b6b981bb4dc145d0078f1418167ef7463f 100644 (file)
@@ -1428,23 +1428,12 @@ settings_ensure_style (GtkSettings *settings)
 
   font_desc = pango_font_description_from_string (font_name);
 
-  /* Unset normal attributes from this description,
+  /* Unset attributes from this description,
    * so they do not override theme values */
-  if (pango_font_description_get_weight (font_desc) == PANGO_WEIGHT_NORMAL)
-    pango_font_description_unset_fields (font_desc,
-                                         PANGO_FONT_MASK_WEIGHT);
-
-  if (pango_font_description_get_stretch (font_desc) == PANGO_STRETCH_NORMAL)
-    pango_font_description_unset_fields (font_desc,
-                                         PANGO_FONT_MASK_STRETCH);
-
-  if (pango_font_description_get_variant (font_desc) == PANGO_VARIANT_NORMAL)
-    pango_font_description_unset_fields (font_desc,
-                                         PANGO_FONT_MASK_VARIANT);
-
-  if (pango_font_description_get_style (font_desc) == PANGO_STYLE_NORMAL)
-    pango_font_description_unset_fields (font_desc,
-                                         PANGO_FONT_MASK_STYLE);
+  pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_WEIGHT);
+  pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_STRETCH);
+  pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_VARIANT);
+  pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_STYLE);
 
   gtk_style_properties_set (priv->style, 0,
                             "font", font_desc,